<!DOCTYPE html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title></title>
    <#include "/header.html">

    <script src="${request.contextPath}/statics/plugins/blockly/blockly-master/blockly_compressed.js"></script>
    <script src="${request.contextPath}/statics/plugins/blockly/blockly-master/blocks_compressed.js"></script>
    <script src="${request.contextPath}/statics/plugins/blockly/blockly-master/msg/js/zh-hans.js"></script>
    <script src="${request.contextPath}/statics/plugins/blockly/blockly-master/javascript_compressed.js"></script>
    <script src="${request.contextPath}/statics/plugins/blockly/blockly-master/python_compressed.js"></script>
    <script src="${request.contextPath}/statics/plugins/blockly/blockly-master/blocks/Basiclibrary.js"></script>
    <script src="${request.contextPath}/statics/plugins/blockly/param.js"></script>
    <script src="${request.contextPath}/statics/plugins/blockly/blockly-master/blocks/Actionlibrary.js"></script>
    <script src="${request.contextPath}/statics/plugins/blockly/blockly-master/blocks/LEDLib.js"></script>
    <script src="${request.contextPath}/statics/plugins/blockly/blockly-master/blocks/BuzzerLib.js"></script>
    <script src="${request.contextPath}/statics/plugins/blockly/GoerBlockFunction.js"></script>
    <link type="text/css" rel="stylesheet" href="${request.contextPath}/statics/plugins/blockly/blocklyStyle.css">
    <script src="${request.contextPath}/statics/libs/ajaxupload.js"></script>
    <script src="${request.contextPath}/statics/plugins/layui2.5.4/layui.js"></script>
    <link type="text/css" rel="stylesheet" href="${request.contextPath}/statics/plugins/layui2.5.4/css/layui.css">
    <style>
        html, body, #rrapp {
            height: 100%;
        }
        .selected{
            background-color: #ddd;
        }

    </style>
</head>
<body>
<div id="rrapp">
    <div class="front-title">
        {{project.project}}
        <span @click="preview()" style="cursor:pointer;"><i class="fa fa-video-camera" aria-hidden="true" ></i> 预览</span>
    </div>
    <div class="flex-Justified audio-module">
        <input type="hidden" id="id" :value="id"/>
        <div class="flex-Justified audio-com">
            <i class="fa fa-music" aria-hidden="true" title="上传音乐"  @click="upMusic"></i>
            <audio  ref='audioExample' id="audio" :src="project.music" controls="controls" >
                Your browser does not support the audio element.
            </audio>
        </div>
        <div class=" flex-Justified audio-oper">
            <input type="text" placeholder="开始" v-model="beginP"/><span style="margin-left:-20px;">秒</span>—<input type="text" placeholder="结束" v-model="endP"/><span style="margin-left:-20px;">秒</span>
            <button @click='play()'><i class="fa fa-refresh" aria-hidden="true"></i> {{playstr}}</button>
        </div>
    </div>
    <div style="border-bottom: 15px solid #f2f3f7;margin:0px -15px;"></div>
    <div class="flex-Justified action-module">
        <div class="action-item">
            <div class="front-title">
                动作组
            </div>
            <div class="item_ojj">
                <ul class="" v-for="(action,index) in actionList">
                    <li class="flex-Justified" :data-actionname="action.actionname" :class="{'selected':index==current}" @click="selected(index,$event)">
                        <div :data-actionname="action.actionname" @click="selected(index,$event)">
                            <i class="iconfont iconzuzhiqunti" :data-actionname="action.actionname" @click="selected(index,$event)"></i>
                            {{action.actionname}}
                        </div>
                        <div :data-actionname="action.actionname" @click="selected(index,$event)">
                            <i class="iconfont iconjia" :data-actionname="action.actionname" data-method="add" @click="openFlight(index,$event)" title="添加无人机"></i>
                            <i class="iconfont iconjiantou2-copy" :data-actionname="action.actionname" @click="selected(index,$event)" title=""></i>
                        </div>
                    </li>
                    <li class="flex-Justified" v-if="action.actionfname" :data-actionname="action.actionname" :class="{'selected':index==current}" @click="selected(index,$event)">
                        <div :data-actionname="action.actionname" @click="selected(index,$event)">
                            <i class="iconfont iconwurenji--" :data-actionname="action.actionname" @click="selected(index,$event)"></i>
                            {{action.actionfname}}
                        </div>
                       <div :data-actionname="action.actionname" @click="selected(index,$event)">
                           <i class="fa fa-wifi" :data-actionname="action.actionname" data-method="upd" @click="openFlight(index,$event)" style="font-size:14px" title="配置无人机"></i>
                           <!--<i class="fa fa-lightbulb-o" aria-hidden="true"></i>-->
                       </div>
                    </li>
                </ul>
            </div>
            <div class="action-font">
                <i class="iconfont iconjia" id="addGroup" @click="addGroup" title="新建动作组"></i>
                <i class="iconfont iconyun" id="uploadGroup" title="导入动作组"></i>
                <i class="iconfont iconyun-copy" @click="expGroup" title="导出动作组"></i>
                <i class="iconfont iconiconfontshanchu" @click="delGroup" title="删除动作组"></i>
            </div>
        </div>
        <div class="action-none">
            <div id="blocklyDiv" style="height: 100%; width: 100%;"></div>
        </div>

    </div>
</div>
<script src="${request.contextPath}/statics/js/modules/front/myproject.js?_${.now?long}"></script>
<!--<script src="${request.contextPath}/statics/libs/upload.js"></script>-->
<script src="${request.contextPath}/statics/plugins/blockly/GoerBlockInit.js?_${.now?long}"></script>
</body>
</html>